from scipy.stats import ttest_ind
import numpy as np

# 生成两组数据
group1 = np.random.normal(0, 1, 100)
group2 = np.random.normal(1, 1, 100)

# 执行 t 检验
t_stat, p_value = ttest_ind(group1, group2)
print("T-statistic:", t_stat)
print("P-value:", p_value)